package hhm.android.library.weightHeightPicker.weightPicker;

import androidx.annotation.NonNull;

import java.util.ArrayList;
import java.util.Collections;

public class LBAdapter extends BaseWeightAdapter {

    public LBAdapter(@NonNull WeightParams dateParams, @NonNull WeightPick datePick, int selectColor) {
        super(dateParams, datePick, selectColor);
    }

    @Override
    public String getItem(int position) {
        int number = mData.get(position);
        return "" + number;
    }

    @Override
    public int getCurrentIndex() {
        return mData.indexOf(mDatePick.kg);
    }

    @Override
    public void refreshValues() {
        ArrayList<Integer> values = new ArrayList<>();
        for (int i = 397; i >= 6; i--) {
            values.add(i);
        }
        Collections.reverse(values);
        setData(values);
    }
}

